package com.shihb.behavioralpatterns.commandpattern;

/**
 *Description:
 *Version:1.0.0
 *@author shihb
 *@date 2020/7/25 20:30
 */
public class LightOffCommand implements Command {

  private Light light;

  public LightOffCommand(Light light) {
    this.light = light;
  }

  @Override
  public void excute() {
    light.off();
  }

  @Override
  public void cancel() {
    light.on();
  }
}
